package com.heima.homeservicemanagementsystem.module;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @Description
 * @Author susu
 * @Date 2024/11/24
 */
@Data
@Schema(description = "分页请求入参参数")
public class PageParams<T> {
    @Schema(description = "页码", defaultValue = "0")
    private int pageNo = 0;
    @Schema(description = "大小", defaultValue = "10")
    private int pageSize = 10;
    @Schema(description = "请求参数")
    private T params;

    @Schema(hidden = true)
    public Page<T> getPage() {
        return new Page<>(pageNo, pageSize);
    }
}
